const vm = require('vm');

global.x = 1;

const script = new vm.Script('x += 400');
const result = script.runInThisContext(); // 这个 this context 是指 global

console.log('xx ------- ' + result);
console.log(global.x);
